We will use the Polioudakis 2019 data to check UMI counts in each cell type for many marker genes including HOPX (oRG), EOMES (IP), STMN2 (Neurons), PDGFRA (OPCs):
markerGenes = c('HOPX', 'EOMES', 'STMN2', 'PDGFRA', 'TBR1', 'PAX6', 'TNC', 'SOX2', 'FAM107A', 'BCL11B', 'SATB2')
setwd('/home/jovyan/FetalBrainMarkers/')
load('../data/fetalBrain/Polioudakis/raw_counts_mat.rdata')
metadata = read.delim('../data/fetalBrain/Polioudakis/cell_metadata.csv', sep = ',')
raw_counts_mat = raw_counts_mat[,metadata$Cell]
df = data.frame(cluster = metadata$Cluster, subcluster = metadata$Subcluster, HOPX = raw_counts_mat['HOPX', ], EOMES = raw_counts_mat['EOMES', ], STMN2 = raw_counts_mat['STMN2', ], PDGFRA = raw_counts_mat['PDGFRA',], TBR1 = raw_counts_mat['TBR1', ], PAX6 = raw_counts_mat['PAX6', ], TNC = raw_counts_mat['TNC', ], SOX2 = raw_counts_mat['SOX2', ], FAM107A = raw_counts_mat['FAM107A',], BCL11B = raw_counts_mat['BCL11B', ], SATB2 = raw_counts_mat['SATB2', ])
for (i in 1:length(markerGenes)){
print(ggplot(df, aes(x=cluster, y=get(markerGenes[i]))) + geom_jitter(size = 0.01) +
stat_summary(fun.data=mean_sdl, fun.args = list(mult=1), geom="pointrange", color="red") +
ylab(paste(markerGenes[i], 'UMI Count', sep = ' ')) +
xlab(NULL) +
ggtitle(paste(markerGenes[i], 'Expression across Celltypes', sep = ' ')) +
theme(axis.text=element_text(size=12)))
}